set     more off
set     matsize 800
clear   all
global  dpath = "[Userpath]\data and code"

cd "$dpath\results"

use "$dpath\data\FigureAIII.dta",clear
drop if code !=1
tw (kdensity cod,lcolor(red) lwidth(medthick) lpattern(longdash)) (kdensity cod,lcolor(blue) lwidth(medthick) lpattern(dash)) (kdensity cod,lcolor(blue) lwidth(medthick)), xline(2.7,lcolor(red) lwidth(medthick) lpattern(longdash)) xline(3.9,lcolor(blue) lwidth(medthick) lpattern(dash)) xtitle("COD (mg/l)") ytitle("Density") legend(label(1 "Yearly manual monitoring data") label(2 "Average automatic monitoring data") label(3 "Weekly automatic monitoring data") size(small))
graph export FigureAIII1.png, as(png) name("Graph") replace

use "$dpath\data\FigureAIII.dta",clear
drop if code !=2
tw (kdensity cod,lcolor(red) lwidth(medthick) lpattern(longdash)) (kdensity cod,lcolor(blue) lwidth(medthick) lpattern(dash)) (kdensity cod,lcolor(blue) lwidth(medthick)), xline(2.9,lcolor(red) lwidth(medthick) lpattern(longdash)) xline(3.8,lcolor(blue) lwidth(medthick) lpattern(dash)) xtitle("COD (mg/l)") ytitle("Density") xlabel(2 (2) 8) legend(label(1 "Yearly manual monitoring data") label(2 "Average automatic monitoring data") label(3 "Weekly automatic monitoring data") size(small))
graph export FigureAIII2.png, as(png) name("Graph") replace

use "$dpath\data\FigureAIII.dta",clear
drop if code !=3
tw (kdensity cod,lcolor(red) lwidth(medthick) lpattern(longdash)) (kdensity cod,lcolor(blue) lwidth(medthick) lpattern(dash)) (kdensity cod,lcolor(blue) lwidth(medthick)), xline(48.2,lcolor(red) lwidth(medthick) lpattern(longdash)) xline(108.5,lcolor(blue) lwidth(medthick) lpattern(dash)) xtitle("COD (mg/l)") ytitle("Density") xlabel(40 (40) 200) legend(label(1 "Yearly manual monitoring data") label(2 "Average automatic monitoring data") label(3 "Weekly automatic monitoring data") size(small))
graph export FigureAIII3.png, as(png) name("Graph") replace

use "$dpath\data\FigureAIII.dta",clear
drop if code !=4
tw (kdensity cod,lcolor(red) lwidth(medthick) lpattern(longdash)) (kdensity cod,lcolor(blue) lwidth(medthick) lpattern(dash)) (kdensity cod,lcolor(blue) lwidth(medthick)), xline(1.9,lcolor(red) lwidth(medthick) lpattern(longdash)) xline(3,lcolor(blue) lwidth(medthick) lpattern(dash)) xtitle("COD (mg/l)") ytitle("Density") legend(label(1 "Yearly manual monitoring data") label(2 "Average automatic monitoring data") label(3 "Weekly automatic monitoring data") size(small))
graph export FigureAIII4.png, as(png) name("Graph") replace

use "$dpath\data\FigureAIII.dta",clear
drop if code !=5
tw (kdensity cod,lcolor(red) lwidth(medthick) lpattern(longdash)) (kdensity cod,lcolor(blue) lwidth(medthick) lpattern(dash)) (kdensity cod,lcolor(blue) lwidth(medthick)), xline(8.6,lcolor(red) lwidth(medthick) lpattern(longdash)) xline(11,lcolor(blue) lwidth(medthick) lpattern(dash)) xtitle("COD (mg/l)") ytitle("Density") xlabel(7 (3) 25) legend(label(1 "Yearly manual monitoring data") label(2 "Average automatic monitoring data") label(3 "Weekly automatic monitoring data") size(small))
graph export FigureAIII5.png, as(png) name("Graph") replace

use "$dpath\data\FigureAIII.dta",clear
drop if code !=6
tw (kdensity cod,lcolor(red) lwidth(medthick) lpattern(longdash)) (kdensity cod,lcolor(blue) lwidth(medthick) lpattern(dash)) (kdensity cod,lcolor(blue) lwidth(medthick)), xline(3.4,lcolor(red) lwidth(medthick) lpattern(longdash)) xline(5.6,lcolor(blue) lwidth(medthick) lpattern(dash)) xtitle("COD (mg/l)") ytitle("Density") legend(label(1 "Yearly manual monitoring data") label(2 "Average automatic monitoring data") label(3 "Weekly automatic monitoring data") size(small))
graph export FigureAIII6.png, as(png) name("Graph") replace

use "$dpath\data\FigureAIII.dta",clear
drop if code !=7
tw (kdensity cod,lcolor(red) lwidth(medthick) lpattern(longdash)) (kdensity cod,lcolor(blue) lwidth(medthick) lpattern(dash)) (kdensity cod,lcolor(blue) lwidth(medthick)), xline(13.5,lcolor(red) lwidth(medthick) lpattern(longdash)) xline(24.5,lcolor(blue) lwidth(medthick) lpattern(dash)) xtitle("COD (mg/l)") ytitle("Density") legend(label(1 "Yearly manual monitoring data") label(2 "Average automatic monitoring data") label(3 "Weekly automatic monitoring data") size(small))
graph export FigureAIII7.png, as(png) name("Graph") replace
